<template>
  <div class="bulletin">
    <div class="bList">
      <div class="header">
        <h3 class="bold">尚品汇快报</h3>
        <a href="###">更多></a>
      </div>
      <ul class="msgList">
        <li v-for="(item, index) in 3" :key="index">
          <span class="bold">[特惠]</span>备战开学季 全民半价购数码
        </li>
        <li><span class="bold">[公告]</span>备战开学季 全民半价购数码</li>
        <li><span class="bold">[公告]</span>备战开学季 全民半价购数码</li>
      </ul>
      <ul class="iconList">
        <li class="life-item" v-for="(item, index) in 12" :key="index">
          <i class="list-item"></i>
          <span class="service-intro">话费{{ index }}</span>
        </li>
      </ul>
      <div class="ads">
        <img src="./images/ad1.png" alt="" />
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "Bulletin",
  data() {
    return {};
  },
};
</script>

<style scoped lang="less">
.bulletin {
  width: 250px;
  height: 460px;

  .bList {
    // border: 1px solid #e4e4e4;
    margin-top: 4px;
    font-size: 12px;

    .header {
      padding: 10px 0;
      margin: 0 10px;
      display: flex;
      justify-content: space-between;
      border-bottom: 1px solid #e4e4e4;
    }

    .msgList {
      li {
        padding: 10px;
        padding-bottom: 0;
        text-align: left;
        &:last-child {
          padding-bottom: 10px;
        }
      }
    }

    .iconList {
      border-top: 1px solid #e4e4e4;
      border-right: 1px solid #e4e4e4;
      overflow: hidden;
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;

      .life-item {
        border-left: 1px solid #e4e4e4;
        border-bottom: 1px solid #e4e4e4;
        // margin-right: -1px;
        height: 64px;
        text-align: center;
        position: relative;
        cursor: pointer;
        width: 25%;

        .list-item {
          background-image: url(./images/icons.png);
          width: 61px;
          height: 40px;
          display: block;
        }

        .service-intro {
          line-height: 22px;
          width: 60px;
          display: block;
        }

        &:nth-child(1) {
          .list-item {
            background-position: 0px -5px;
          }
        }

        &:nth-child(2) {
          .list-item {
            background-position: -62px -5px;
          }
        }

        &:nth-child(3) {
          .list-item {
            background-position: -126px -5px;
          }
        }

        &:nth-child(4) {
          .list-item {
            background-position: -190px -5px;
          }
        }

        &:nth-child(5) {
          .list-item {
            background-position: 0px -76px;
          }
        }

        &:nth-child(6) {
          .list-item {
            background-position: -62px -76px;
          }
        }

        &:nth-child(7) {
          .list-item {
            background-position: -126px -76px;
          }
        }

        &:nth-child(8) {
          .list-item {
            background-position: -190px -76px;
          }
        }

        &:nth-child(9) {
          .list-item {
            background-position: 0px -146px;
          }
        }

        &:nth-child(10) {
          .list-item {
            background-position: -62px -146px;
          }
        }

        &:nth-child(11) {
          .list-item {
            background-position: -126px -146px;
          }
        }

        &:nth-child(12) {
          .list-item {
            background-position: -190px -146px;
          }
        }
      }
    }
    .ads {
      margin-top: 6px;
    }
  }

  .bold {
    font-weight: bold;
  }
}
</style>
